/**   
 * @Title: RescServiceImpl.java 
 * CopyRight(c)2010-DMX 
 */
package com.dmx.fw.service.impl;

import java.util.List;

import com.dmx.fw.bean.mapping.pojo.Resc;
import com.dmx.fw.dao.interfaces.RescDao;
import com.dmx.fw.service.interfaces.RescService;

/** 
 * @Description: RescData Service Implement
 * @author: zhaojie
 * @date: 2010
 * @version V1.0 
 * 
 */
public class RescServiceImpl extends BaseServiceImpl implements RescService {

	private RescDao rescDao;

	public RescDao getRescDao() {
		return rescDao;
	}

	public void setRescDao(RescDao rescDao) {
		this.rescDao = rescDao;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Resc> getRescs() {
		String hql = "from Resc";
		List list = rescDao.find(hql);
		return list;
	}
	
	/**
	 * <p>Description: 创建Resc</p> 
	 * @param resc
	 * @return Long
	 * @see com.dmx.fw.service.interfaces.RescService#create(com.dmx.fw.bean.mapping.pojo.Resc)
	 */
	public Long create(Resc resc){
		return this.rescDao.create(resc);
	}
	
	/**
	 * <p>Description: 根据ID,删除Resc</p> 
	 * @param Resc 
	 * @see com.dmx.fw.service.interfaces.RescService#delete(com.dmx.fw.bean.mapping.pojo.Resc)
	 */
	public void delete(Resc resc){
		this.rescDao.delete(resc);
	}
	
	/**
	 * <p>Description: 更新Resc</p> 
	 * @param Resc 
	 * @see com.dmx.fw.service.interfaces.RescService#update(com.dmx.fw.bean.mapping.pojo.Resc)
	 */
	public void update(Resc resc){
		this.rescDao.update(resc);
	}
	
	/**
	 * <p>Description: 根据ID加载Resc</p> 
	 * @param rescId
	 * @return 
	 * @see com.dmx.fw.service.interfaces.RescService#getResc(java.lang.String)
	 */
	public Resc getResc(String rescId){
		return this.rescDao.getResc(rescId);
	}
}
